#version 120

uniform float Time; /* in milliseconds maybe */

attribute vec3 VertexPosition;
attribute vec3 VertexNormal;
attribute vec2 VertexTexCoord;

varying vec3 Position;
varying vec3 Normal;
varying vec2 TexCoord;

uniform mat4 MatrixModel;
uniform mat4 MatrixView;
uniform mat4 MatrixProjection;

void main(void) {

  mat4 MatrixMV =  MatrixView * MatrixModel;
  mat4 MatrixMVP = MatrixProjection * MatrixMV;
  
  vec4 Position = vec4(VertexPosition, 1.0);
  Position.y += 0.3 * sin(5.0*VertexPosition.x + 0.6*VertexPosition.z + 0.005 * Time); 
  TexCoord = VertexTexCoord;
 
  gl_Position = MatrixMVP * Position;
}
